<?php
$mysqli = mysqli_connect("localhost","root","123456","friend");
if(!$mysqli )
{
    die('数据库连接失败');
}